package com.marvels.common.exception;

/**
 * 业务异常状态枚举
 * @author wangliang
 *
 */
public enum MarvelsErrorCode {
	
	NULL_OBJ("10001","请求对象为空"),
    NULL_PARAMS("10002","请求参数为空"),
    TIME_OUT("10003","请求超时"),
    USER_NAME_NULL("10004","用户名为空"),
    USER_NOT_EXIST("10005","用户名不存在"),
    USER_COUNT_EXP("10006","用户账户异常"),
    USER_PWD_NULL("10007","用户密码为空"),
    USER_PWD_ERROR("10008","用户密码错误"),
    USER_PWD_OUT("10009","用户密码未生效或已过期"),
    USER_COUNT_LOGGED("10010","用户已登录"),
    USER_NOT_LOGGED("10011","用户未登录"),
    UNKNOWN_ERROR("99999","系统繁忙, 请稍后再试...."),
    
	SUCCESS("success","成功"),
	PROCESSING("processing","处理中"),
	FAIL("fail","失败"),
	ERROR("error","异常");
	
	private String value;
	private String desc;
	
	private MarvelsErrorCode(String value,String desc){
		this.value = value;
		this.desc = desc;
	}

	public String getValue() {
		return value;
	}

	public String getDesc() {
		return desc;
	}
	
	@Override
	public String toString() {
		return "["+this.value+"] "+this.desc;
	}
	
}
